package com.moyun.service.upload;

import com.baomidou.mybatisplus.extension.service.IService;
import com.moyun.model.po.upload.SysAttachmentEntity;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author yangboxuan
 * @since 2021-07-13
 */
public interface SysAttachmentService extends IService<SysAttachmentEntity> {

    /**
     * @return void
     * @Author yangboxuan
     * @Description 文件上传
     * @Date 2021/7/13 16:26
     * @Param [files, docunid, attType, width, height]
     **/

    boolean upload(MultipartFile[] files, String docunid, String attType, Integer width, Integer height) throws IOException;

    /**
     * @return boolean
     * @Author yangboxuan
     * @Description 文件下载
     * @Date 2021/7/21 10:31
     * @Param []
     **/
    void download(String fileName, HttpServletResponse response) throws IOException;

}
